import request from '@/utils/request'

// 获取部门的列表
export function getDepartments() {
  return request.get('/company/department')
}

// 获取部门负责人
export function getEmployeesSimple() {
  return request.get('/sys/user/simple')
}

// 新增 子部门
export function addDepartments(data) {
  return request.post('/company/department', data)
}

// 获取 部门数据
export function getDepartmentsById(id) {
  return request.get(`/company/department/${id}`)
}

// 修改 部门数据
export function editDepartments(data) {
  return request.put(`/company/department/${data.id}`, data)
}

// 根据ID删除部门
export function delUserInfoByID(id) {
  return request.delete(`/company/department/${id}`)
}
